package com.woorigil.social.domain.query;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.woorigil.social.domain.deal.RecentQuery;
import com.woorigil.social.domain.deal.RecentQueryDao;

@Service
public class QueryService {
	@Autowired RecentQueryDao recentQueryDao;

	public QueryBox findAllBySid(String sid) {
		List<RecentQuery> recentQueries = recentQueryDao.search(sid);
		return new QueryBox(recentQueries);
	}

	public int deleteRecentQueryBySidAndQuery(String sid, String query) {
		return recentQueryDao.deleteBySidAndQuery(sid, query);
	}

}
